/*
 * Copyright (C) 2018 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.xuexiang.xdlink.exception;

/**
 * 通信通道错误
 *
 * @author xuexiang
 * @since 2018/8/13 上午1:53
 */
public class ChannelException extends ConnectException {
	/**
	 * 在主线程进行socket写操作错误
	 */
	public final static int WRITE_ON_MAIN_THREAD_ERROR = 100;
	/**
	 * 通道写失败错误
	 */
	public final static int WRITE_FAILED_ERROR = 101;
	/**
	 * 通道关闭写入错误
	 */
	public final static int WRITE_CHANNEL_CLOSED_ERROR = 102;

	public ChannelException(String detailMessage) {
		super(detailMessage);
	}

	public ChannelException(int code, String detailMessage) {
		super(code, detailMessage);
	}
	
	public ChannelException(int code, Throwable throwable) {
		super(code, throwable);
	}
}
